import request from '@/utils/request'
// import type { ChannelDto } from './types'
import { paramsToString } from '@/utils/util'
import type { PageDto, PageReqDto, PagesDto } from '../types'
import type { ChannelTypeCnEnum } from '@/const/enum'

/**
 * 新增渠道组
 * @param params 
 * @returns 
 */
export function addChannel(data: {
    auditStatus: 1,
    type: ChannelTypeCnEnum.系统渠道
    name: string
}): Promise<void> {
    return request.post('/crm-prod/crm/channel', data)
}

/**
 * 编辑渠道组
 * @param data 
 * @returns 
 */
export function editChannel(data: {
    id: number,
    name: string
}): Promise<void> {
    return request.put('/crm-prod/crm/channel', data)
}
